C C -C Programming /Computer Science Sample Test,Sample questions

Question:
 #include are _______ files and #include "somefile.h ________ files.

1. Library, Library

2.Library, user-created header

3.User-created header, library

4.They can include all types of file


Question:
 #pragma exit is primarily used for?

1.Checking memory leaks after exitting the program

2.Informing Operating System that program has terminated

3.Running a function at exitting the program

4.No such preprocessor exist


Question:
#include is called

1.Preprocessor directive

2.Inclusion directive

3.File inclusion directive

4.None of the mentioned


Question:
#include statement must be written.

1.Before main()

2.Before any scanf/printf

3.After main()

4.It can be written anywhere


Question:
A preprocessor is a program.

1.That processes its input data to produce output that is used as input to another program

2.That is nothing but a loader

3.That links various source files

4.All of the mentioned


Question:
C preprocessors can have compiler specific features.

1.True

2.False

3. Depends on the standard

4.Depends on the platform


Question:
If #include is used with file name in angular brackets.

1.The file is searched for in the standard compiler include paths

2.The search path is expanded to include the current source directory

3. Both a & b

4.None of the mentioned


Question:
Preprocessor feature that supply line numbers and file names to compiler is called?

1.Selective inclusion

2.macro substitution

3.Concatenation

4.Line control


Question:
Property which allows to produce different executable for different platforms in C is called?

1.File inclusion

2.Selective inclusion

3.Conditional compilation

4.Recursive macros


Question:
The #include directive

1.ells the preprocessor to grab the text of a file and place it directly into the current file

2.Statements are typically placed at the top of a program

3.both a & b

4.None of a & b


Question:
The C-preprocessors are specified with _________symbol.

1.#

2.$

3." "

4.None of the mentioned


Question:
The preprocessor provides the ability for _______________.

1.The inclusion of header files

2.The inclusion of macro expansions

3.Conditional compilation and line control.

4.All of the mentioned


Question:
What is the output of this C code?

int main()
{
enum {ORANGE = 12, MANGO, BANANA = 11, APPLE};
printf("APPLE = %d
", APPLE);
}

1.APPLE= 11

2. APPLE= 12

3.APPLE= 23

4.APPLE= 0


Question:
Which of the following are C preprocessors?

1.#ifdef

2. #define

3.#endif

4.All of the mentioned


More MCQS

  1. C++ Programming MCQS Set-1
  2. C++ Multiple Choice Questions Set-1
  3. C++ Multiple Choice Questions Set-2
  4. C++ Programming MCQS Set-2
  5. C++ Programming MCQS Set-3
  6. C++ Programming MCQS Set-4
  7. C++ (CPP) MCQ Question with Answer
  8. Advanced c++ multiple choice question(MCQS)
  9. OOPS Quiz Questions and Answers(MCQS)
  10. C Programming - MCQ Questions Set 1
  11. C Programming - MCQ Questions Set 2
  12. C Programming - MCQ Questions Set 3
  13. C Programming - MCQ Questions Set 4
  14. C Programming - MCQ Questions Set 5
  15. C++ programming language MCQ Questions Set 1
  16. C++ programming language MCQ Questions Set 2
  17. C++ programming language MCQ Questions Set 3
  18. C++ programming language MCQ Questions Set 4
  19. C++ programming language MCQ Questions Set 5
  20. C++ Programming -Constructors and Destructors
  21. C++ Programming -OOPS Concepts
  22. C++ Programming - References
  23. C++ Programming - Functions
  24. C MCQS:-The ABC of C
  25. C MCQS Interview Questions
  26. C++ Questions and Answers OOPs Basic Concepts
  27. C++ Questions and Answers Returning Objects
  28. C Programming MCQ Part 1
  29. C Programming MCQ
  30. Computer Science & Engineering C Multiple Choice Questions set 1
  31. Computer Science & Engineering C Multiple Choice Questions set 2
  32. C Multiple Choice Questions C Functions Set 1
  33. C Multiple Choice Questions C Functions Set 2
  34. C Multiple Choice Questions C Operators
  35. C Multiple Choice Questions & AnswersConditional Expressions
  36. C Multiple Choice Questions & Answers Data Types
  37. C Multiple Choice Questions & Answers File Access
  38. Computer Science & Engineering Cloud Computing MCQs Part 1
  39. CPP Programming MCQ Set 1
  40. CPP Programming MCQ Set 2
Search
Olete Team
Online Exam TestTop Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Testwebsite is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!